import request from '@/request/request.js'

// 初始化聊天
export const chatShake = (params) => {
	return request({
		url: "/api/wanlshop/chat/shake",
		method: "post",
		data: params,
	})
}

// 读取消息列表
export const chatLists = (params) => {
	return request({
		url: "/api/wanlshop/chat/lists",
		method: "post",
		data: params,
	})
}

// 一键已读消息
export const chatAllRead = (params) => {
	return request({
		url: "/api/wanlshop/chat/read",
		method: "post",
		data: params,
	})
}

// 更新消息
export const chatClear = (params) => {
	return request({
		url: "/api/wanlshop/chat/clear",
		method: "post",
		data: params,
	})
}

// 发送消息
export const chatSend = (params) => {
	return request({
		url: "/api/wanlshop/chat/send",
		method: "post",
		data: params,
	})
}

// 删除消息
export const chatDel = (params) => {
	return request({
		url: "/api/wanlshop/chat/del",
		method: "post",
		data: params,
	})
}

// 获取历史记录
export const chatHistory = (params) => {
	return request({
		url: "/api/wanlshop/chat/history",
		method: "post",
		data: params,
	})
}

// 商家在线状态
export const chatShopChat = (params) => {
	return request({
		url: "/api/wanlshop/chat/getShopChat",
		method: "post",
		data: params,
	})
}

// 查询浏览商品
export const chatBrowsingToShop = (params) => {
	return request({
		url: "/api/wanlshop/product/getBrowsingToShop",
		method: "post",
		data: params,
	})
}

// 查询订单
export const chatOrderToShop = (params) => {
	return request({
		url: "/api/wanlshop/order/getOrderListToShop",
		method: "post",
		data: params,
	})
}

// 退出登录
export const chatLogout = (params) => {
	return request({
		url: "/api/wanlshop/user/logout",
		method: "post",
		data: params,
	})
}